<%--
  Created by IntelliJ IDEA.
  User: fujia
  Date: 2016/5/24
  Time: 15:50
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="s" uri="/struts-tags" %>

<!doctype html>
<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="lt-ie9 lt-ie8" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="lt-ie9" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-US"> <!--<![endif]-->
<%@include file="common/head.jsp"%>

<body id="page-index">

    <%@include file="common/nav.jsp"%>

    <!-- Start of Page Container -->
    <div class="page-container">
        <div class="container">
            <div class="row">

                <s:if test="#session.newArticles != null && #session.hotArticles">
                    <!-- start of page content -->
                    <div class="span8 page-content">
                        <!-- Basic Home Page Template -->
                        <div class="row separator">
                            <section class="span4 articles-list">
                                <h3>文章精选</h3>
                                <ul class="articles">
                                    <s:iterator value="#session.hotArticles" status="article">
                                        <li class="article-entry standard">
                                            <h4><a href="single.action?article=<s:property value="articleId" />"><s:property value="title" /></a></h4>
                                            <span class="article-meta"><s:property value="dateAdded" /></span>
                                            <span class="like-count"><s:property value="praiseNumber" /></span>
                                        </li>
                                    </s:iterator>
                                </ul>
                            </section>

                            <section class="span4 articles-list">
                                <h3>最新文章</h3>
                                <ul class="articles">
                                    <s:iterator value="#session.newArticles" status="article">
                                        <li class="article-entry standard">
                                            <h4><a href="single.action?article=<s:property value="articleId" />"><s:property value="title" /></a></h4>
                                            <span class="article-meta"><s:property value="dateAdded" /></span>
                                            <span class="like-count"><s:property value="praiseNumber" /></span>
                                        </li>
                                    </s:iterator>
                                </ul>
                            </section>
                        </div>
                    </div>
                    <!-- end of page content -->
                </s:if>
                <s:else>
                    <div class="span8 page-content">
                        <blockquote>
                            <h2>欢迎，KnowledgeBase为世界而知！</h2>
                        </blockquote>
                    </div>
                </s:else>

                <%@include file="common/aside.jsp"%>
            </div>
        </div>
    </div>
    <!-- End of Page Container -->

    <%@include file="common/foot.jsp"%>

    <a href="#top" id="scroll-top"></a>

    <%@include file="common/script.jsp"%>

</body>
</html>
